package com.state.demo2.impl;

import com.state.demo2.State;
import com.state.demo2.Work;

public class NoonState implements State {

	@Override
	public void writeProgram(Work w) {
		if (w.getHour() < 13) {
			System.out.println("当前时间：" + w.getHour() + "，中午，犯困");
		} else {
			w.setCurrent(new AfternoonState());
			w.writeProgram();
		}
	}

}
